//package sc.core.auth;
//
//import org.springframework.security.userdetails.UserDetails;
//import org.springframework.security.userdetails.UserDetailsService;
//import org.springframework.security.userdetails.UsernameNotFoundException;
//
//import sc.core.dal.dataobject.UserInfoDO;
//import sc.core.model.auth.UserToken;
//
//public class DefaultUserDetailsService implements UserDetailsService {
//
//	UserManager userManager;
//
//	@Override
//	public UserDetails loadUserByUsername(String username)
//			throws UsernameNotFoundException{
//		UserInfoDO userInfoDO = null;
//		try {
//			userInfoDO = userManager.getLocalUserByLoginName(username);
//		} catch (Exception ex) {
//			ex.printStackTrace();
//		}
//		if (userInfoDO == null)
//			throw new UsernameNotFoundException("User[" + username
//					+ "] does not exist");
//		UserToken userToken = new UserToken(userInfoDO);
//		return userToken;
//	}
//
//	public void setUserManager(UserManager userManager) {
//		this.userManager = userManager;
//	}
//
//}
